<style>
  .bright:link{
color: #666666;

  }
    .title{
        color: #BBBBBB;
    }
  .line_m{
      color: #DADADA;
      text-decoration:line-through;
      width: 1px;
  }
</style>
<p class="text-center" style="margin-top: 40px"><%= image_tag "tit.png" %></p>
<p class="text-center "><%= image_tag "des.png"%></p>
<br>
<div style="text-align: center">
  <span class="line_m" style="font-size: 28px">&nbsp;&nbsp;</span>
  <b style="font-size: x-large">  <%=link_to "登陆",login_path %></b>
  <b style="font-size: 20px">·</b>
  <b style="font-size: x-large">  <%=link_to "注册",new_user_path,class:'title' %></b>
  <span class="line_m" style="font-size: 28px">&nbsp;&nbsp;</span>
</div>

<br>
<div>
  <%= form_for(:session,url: login_path)do |f| %>
      <div class=" input-group input-group-lg " style="width: 35%; margin: 0 auto">
        <span class=" input-group-addon">
            <span class="glyphicon glyphicon-envelope " aria-hidden="true"></span>
        </span>
        <%= f.text_field :email, class: 'form-control input-lg',placeholder:'Useremail' %>
        <!--<input type="text" class="form-control" placeholder="Useremail" aria-describedby="basic-addon1">-->
      </div>
      <br>

      <div class=" input-group input-group-lg " style="width: 35%;margin: 0 auto">
        <span class=" input-group-addon">
            <span class="glyphicon glyphicon-user " aria-hidden="true"></span>
        </span>
        <%= f.text_field :name, class: 'form-control input-lg',placeholder:'Username' %>
        <!-- 不加input-lg太小,变得比图片小 -->
      </div>
      <br>

      <div class=" input-group input-group-lg " style="width: 35%;margin: 0 auto">
          <span class=" input-group-addon">
            <span class="glyphicon glyphicon-lock " aria-hidden="true"></span>
          </span>
          <%= f.password_field :password, class: 'form-control input-lg',placeholder:'password'%>
      </div>
      <div style="margin: 0 auto;width: 35%">
        <%= f.check_box :remember%>记住密码
        <%= "极验证"%>
        <span class="pull-right"><%=link_to '忘记密码',new_password_rest_path%></span>
      </div>
      <br>
      <div style="width:35% ;margin: 0 auto;text-align:center;">
        <%=f.submit '登陆',class: 'btn btn-success btn-lg btn-block' %>
        <br>
        <p style="width: 100%;color: #999999">
          点击 “注册” 或下方社交登录按钮，即表示您同意并愿意遵守xblog用户
          <%=link_to "协议",'#'%> 和
          <%=link_to "隐私政策",'#' %>。
        </p>
      </div>
  <%end%>
</div>


<hr style="width: 50%">

<script>
  window.onload=resize();
  window.onresize = function(){
      resize();
  }
  function resize()
  {
//      var wid= document.body.clientWidth;
      var node=document.getElementsByClassName("line_m");
      node[0].style.wordSpacing = window.innerWidth/7+"px";
      node[1].style.wordSpacing = window.innerWidth/7+"px";


  }

</script>